<template>
    <a-input v-model="value" allow-clear/>
</template>

<script setup lang="ts">

interface Props {
    modelValue: string
}

const props = withDefaults(defineProps<Props>(), {
    modelValue: () => ''
})

const emit = defineEmits<{
    (e: 'update:modelValue', value: string): void
}>()

const value = computed({
    get: () => props.modelValue,
    set: (value) => emit('update:modelValue', value)
})

</script>
